package com.ff.discounts.component.returnmaney
/**
* 18 抢参记录
*/
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.recyclerview.widget.LinearLayoutManager
import com.ff.discounts.R
import com.ff.discounts.activity.BaseViewModelActivity
import com.ff.discounts.component.free.FreeActivity
import com.ff.discounts.component.tab.home.GoodsAdapter
import com.ff.discounts.component.tab.home.HistoryData
import com.ff.discounts.databinding.ActivityReturnMoneyBinding
import com.qmuiteam.qmui.util.QMUIStatusBarHelper

class ReturnMoneyActivity : BaseViewModelActivity<ActivityReturnMoneyBinding>() {
    private lateinit var returnGoodsAdapter: ReturnGoodsAdapter

    override fun initViews() {
        super.initViews()
        // 设置沉浸式状态栏
        QMUIStatusBarHelper.translucent(this)

        binding.returnMoneyList.apply {
            layoutManager = LinearLayoutManager(hostActivity)

        }


    }

    override fun initListeners() {
        super.initListeners()
        binding.back.setOnClickListener {
            finish()
        }
    }

    override fun initDatum() {
        super.initDatum()

        // 绑定returnGoodsAdapter
        returnGoodsAdapter = ReturnGoodsAdapter()
        binding.returnMoneyList.adapter = returnGoodsAdapter
        returnGoodsAdapter.submitList(ReturnMoneyActivity.historyDataList)
    }
    companion object {

        private val historyDataList = mutableListOf<HistoryData>(
            HistoryData(R.drawable.photo, "极品校花爱上我", "第五集"),
            HistoryData(R.drawable.photo, "极品校花爱上我", "第五集"),
            HistoryData(R.drawable.photo, "极品校花爱上我", "第五集"),
            HistoryData(R.drawable.photo, "极品校花爱上我", "第五集"),
            HistoryData(R.drawable.photo, "极品校花爱上我", "第五集"),
            HistoryData(R.drawable.photo, "极品校花爱上我", "第五集"),
            HistoryData(R.drawable.photo, "极品校花爱上我", "第五集"),
            HistoryData(R.drawable.photo, "极品校花爱上我", "第五集")

        )
    }
}